package com.qf.handler;

import com.qf.exception.JxcException;
import com.qf.vo.ResultVO;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
// @ControllerAdvice + @ResponseBody
public class JxcExceptionHandler {

    @ExceptionHandler({JxcException.class})
    public ResultVO jxc(JxcException ex){
        return new ResultVO(ex.getCode(),ex.getMessage(),null);
    }


}
